package Team.Listener.MainFrame;

import java.awt.event.*;
import Team.View.MainFrame.*;

import javax.swing.JFileChooser;

public class SelectButtonListener implements ActionListener
{
	public SelectButtonListener(TeamMainFrameView view)
	{
	    this.view =	view;
	}
    public void actionPerformed(ActionEvent event)
    {
    	JFileChooser chooser = new JFileChooser();
    	chooser.setAcceptAllFileFilterUsed(false);
    	chooser.setMultiSelectionEnabled(false);
    	
    	int option = chooser.showOpenDialog(null);
    	if (option == JFileChooser.APPROVE_OPTION)
    	{
    		view.filePathLabel.setText(chooser.getSelectedFile().getAbsolutePath());
    	}
    }
    
    private TeamMainFrameView view;
}
